berhoel.ctitools package

Work with cti index files for the Heise papers c’t and iX

class berhoel.ctitools.CTI(infile: Path, limit_year: int = None, limit_issue: int = None, limit_journal: str = None)[source]

Bases: object

Read entries from cti files:

Bürokratie: Mit analoger Wucht

Tim Gerber
tig
  3
16
c22

Standpunkt,Immer in c't,Gesellschaft,Ukraine-Krieg,Ukraine-Hilfe,Digitalisierung
paper_year = re.compile('(?P<paper>[ci])(?P<year>[0-9]{2})')
paper_map = {'c': "c't magazin für computertechnik", 'i': 'iX'}
__init__(infile: Path, limit_year: int = None, limit_issue: int = None, limit_journal: str = None)[source]

Read input file.

Parameters:
  • infile (file) – Input file

  • limit_year (int) – Limit output to given year

  • limit_issue (int) – Limit output to given issue

  • limit_journal (str) – Limit output to given journal

async _gen_data(inp)[source]
async _read_lines(inp)[source]
async _parse_input(data: List[str])[source]
static fix_chars(inp: str) str[source]
dusan_replace_re = re.compile('Duzan|Dusan')
zivadinovic_replace_re = re.compile("Zivadinovic|Zivadinovi∩c|Zivadinovi'c|Zivadanovic|Zivadinivic")
static fix_author(author)[source]

Fix author information

Parameters:

author (str) –

Returns:

str

berhoel.ctitools.main()[source]
berhoel.ctitools.build_cti_statistics_parser()[source]
berhoel.ctitools.issue_key(a)[source]
berhoel.ctitools.cti_statistics()[source]

Subpackages

Submodules

berhoel.ctitools.__main__ module

berhoel.ctitools.ct module

Manage entries for c’t.

class berhoel.ctitools.ct.IssueMap[source]

Bases: object

Class for determinig issue date for c’t issues.

__init__()[source]
__call__(year: int, issue: int) datetime[source]

Generate release dates for c’t.

class berhoel.ctitools.ct.Ct(shorttitle: str, title: str, author: list[str], pages: int, issue: int, info: str, year: int, references: str, keywords: str)[source]

Bases: object

Prepare c’t issue information.

issue_map = <berhoel.ctitools.ct.IssueMap object>
month_issue_map = {1: 'Januar', 2: 'Februar', 3: 'März', 4: 'April', 5: 'Mai', 6: 'Juni', 7: 'Juli', 8: 'August', 9: 'September', 10: 'Oktober', 11: 'November', 12: 'Dezember'}
__init__(shorttitle: str, title: str, author: list[str], pages: int, issue: int, info: str, year: int, references: str, keywords: str)[source]

Add information for a c’t issue.

Parameters:
  • shorttitle (str) –

  • title (str) –

  • author (str) –

  • pages (int) –

  • issue (int) –

  • info (str) –

  • year (int) –

  • keywords (str) –

__call__()[source]

Call self as a function.

static year_issue2full_issue(year, issue)[source]

Retrieve full issue for c’t from year and issue number.

Parameters:
  • year (int) –

  • issue (int) –

Returns:

str

berhoel.ctitools.ctientry module

Base class for cti (c’t iX) entries.

class berhoel.ctitools.ctientry.CTIEntry(shorttitle: str, title: str, author: Tuple[str], pages: int, issue: int, info: Dict[str, str], journaltitle: str, date: str, references: str, keywords: str)[source]

Bases: object

Store information from input file.

shorttitle: str
title: str
author: Tuple[str]
pages: int
issue: int
info: Dict[str, str]
journaltitle: str
date: str
references: str
keywords: str
__init__(shorttitle: str, title: str, author: Tuple[str], pages: int, issue: int, info: Dict[str, str], journaltitle: str, date: str, references: str, keywords: str) None

berhoel.ctitools.ix module

Manage entries for iX.

class berhoel.ctitools.ix.Ix(shorttitle: str, title: str, author: str, pages: int, issue: int, info: str, year: int, references: str, keywords: str)[source]

Bases: CTIEntry

Prepare iX issue information.

month_issue_map = {1: 'Januar', 2: 'Februar', 3: 'März', 4: 'April', 5: 'Mai', 6: 'Juni', 7: 'Juli', 8: 'August', 9: 'September', 10: 'Oktober', 11: 'November', 12: 'Dezember'}
__init__(shorttitle: str, title: str, author: str, pages: int, issue: int, info: str, year: int, references: str, keywords: str)[source]

Add information for a iX issue.

Parameters:
  • shorttitle (str) –

  • title (str) –

  • author (str) –

  • pages (int) –

  • issue (int) –

  • info (str) –

  • journal (str) –

  • year (int) –

  • keywords (str) –

__call__()[source]

Call self as a function.